<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function fv() {
//            var d = document.getElementById("div1");
//      object.style.visibility="hidden"; //hides an object
//       object.style.visibility="visible"; //show an bojext
//            d.style.visibility ="hidden";
            var id=document.getElementById("div1");
//            id.style.display="none";
            id.style.visibility ="hidden";
            //jquery做法
//            $("#TextBox3").attr("visible", false);
        }

    </script>
</head>
<body>
    <div id ="div1" style="height: 200px;width: 200px;background-color: #0E2D5F">

    </div>
<button onclick="fv()">df</button>
</body>
</html>